Assigning USING for accessing a different namespace folder

The USING instruction makes it possible to access the objects of a different namespace folder existing in the application navigator
(info) The USING instruction corresponds to a USING namespace directive you might know when creating ST-code (see "Namespaces in ST: usage" for more information). 

How to create a USING instruction within a namespace folder:

  1. Make the application navigator visible.

  2. In the context menu of a namespace folder, select Assign Using...

  3. In the dialog, select a different namespace folder from the list beside of Namespace and click OK.
    Result: The current namespace folder contains a USING instruction with the icon . Subsequently, you are able to access the objects from the namespace folder specified by the USING instruction.

Restriction for editors

If you open an object that is located in a namespace folder with such a USING instruction, the respective editor does not contain the equivalent for the USING instruction. This means:

  • In the ST-editor, there is no USING namespace directive specifying the namespace.

  • In the FBD-/LD-editor, the used namespace is not listed in the field Used namespaces (in the tab Namespaces).

    But the access to the objects to the different namespace folders is possible in spite of the missing equivalent within the editor – the USING instruction in the application navigator makes this access possible.

 

Good to know

(grey lightbulb) How to quickly change from the USING instruction to the assigned namespace folder: Open the context menu for the USING instruction in the application navigator and select Go to Namespace. Alternative: Press the F3-key.

(grey lightbulb) If you do not need an USING instruction anymore or you have created it by mistake:

  • Delete the USING instruction: Open the context menu for the USING instruction in the application navigator and select Delete. Alternative: Press the Del-key.

  • Alternative, if you have just created the USING instruction: Undo the creation.